import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_category",{schema:"nest-mall" } )
@Index("parent_id",["parentId",])
export class MallCategory {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("varchar",{ 
        nullable:false,
        length:90,
        name:"name"
        })
    name:string;
        

    @Column("varchar",{ 
        nullable:true,
        name:"keywords"
        })
    keywords:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"front_desc"
        })
    frontDesc:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"parent_id"
        })
    parentId:number | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'50'",
        name:"sort_order"
        })
    sortOrder:number | null;
        

    @Column("tinyint",{ 
        nullable:true,
        width:1,
        default: () => "'0'",
        name:"show_index"
        })
    showIndex:boolean | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'1'",
        name:"is_show"
        })
    isShow:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"banner_url"
        })
    bannerUrl:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"icon_url"
        })
    iconUrl:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"img_url"
        })
    imgUrl:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"wap_banner_url"
        })
    wapBannerUrl:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"level"
        })
    level:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"type"
        })
    type:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"front_name"
        })
    frontName:string | null;
        
}
